<?php

/**
* Created by PhpStorm.
 * User: kphcdr
 * Date: 16/3/6
 * Time: 上午1:06
 */

namespace app\admin\ctrl;

use core\model\confModel;

class baseCtrl extends \ppphp
{
	public function __construct()
	    {
		//加		载网站基本配置
		        $this->webconf();
		$this->route();
	}
	
	
	protected function webconf()
	    {
		$confModel = new confModel();
		$data = $confModel->getall();
		$webconf = [];
		foreach($data as $a) {
			$webconf[$a['keystr']] = $a['value'];
		}
		$this->assign('CONF',$webconf);
	}
	
	protected function route()
	    {
		$route = new \ppphp\route();
		$this->assign('MODULE',$route->module);
		$this->assign('CTRL',$route->ctrl);
		$this->assign('ACTION',$route->action);
	}
	
	
	
}
